"""testproject URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
#起到路由功能，将方法处理及界面转到views.py再转到templates中的主页
from django.conf.urls import url,include
from django.contrib import admin
from django.conf.urls import url
from django.contrib import admin
from testapp import views as testview  #给testapp_views起了别名
from realapp import views as realview
from users import urls as nice
#admin.autodiscover()


urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^print/$', testview.index),
    url(r'^add/$', testview.add, name='add'),
    url(r'^add2/(\d+)/(\d+)/$', testview.old_add2_redirect),
    url(r'^jiajia/(\d+)/(\d+)/$', testview.add2, name='add2'),
    url(r'^jia/(\d+)/(\d+)/$', testview.add2, name='add2'),
    #url(r'^$', testview.jumptohomepage),

    url(r'^homehome/$', realview.homehomepage, name='homehomepage'),
    url(r'^home/$', testview.homepage, name='homepage'),
    url(r'^shouye/$', testview.shouye, name='shouyeye'),
    url(r'^print_string/$', testview.print_string, name='print_string'),
    url(r'^for_loop/$', testview.for_loop, name='for_loop'),
    url(r'^print_dict/$', testview.print_dict, name='print_dict'),
    url(r'^forloop_if/$', testview.forloop_if, name='forloop_if'),
    url(r'^use_if/$', testview.use_if, name='use_if'),
    url(r'^get_url_user/$', testview.get_url_user, name='get_url_user'),

    url(r'^first/$', testview.first, name='home'),
    url(r'^$', testview.index, name='index'),

    url(r'^realapp/$', realview.homehomepage, name='get_url_user'),
    url(r'^accounts/', include('users.urls')),
]

